local c = require("rackspace-cf").connection()

c:updateobj("cloudservers","test3.txt","This is a test file as well")
for container in c:containers() do
	for item in c:items(container) do
		print(string.format("%s/%s", container, item))
	end
end

if c:isContainer("optimizer_convscripts") then
	print("Yay! Have convscripts directory")
else
	print("Nay! Don't have convscripts directory")
end

print(c:isObject("cloudServers", "opTIMizervm01_20120220_005610_cloudserver10112416.yml"))

--Obviously this will fail unless you're accessing our cloud account
print(c:object("cloudservers", "optimizervm01_20120220_005610_cloudserver10112416.yml"))

c:updateobj("cloudservers", "test_with_meta", "This is a test - look at the metadata", {MetaData1="hello"})
local meta = c:objmeta("cloudservers", "test_with_meta")
for k,v in pairs(meta) do
	print(k,v)
end
